#pragma once

#include "Object.h"
#include "Shapes3D/Point3D.h"

class Camera : public Object
{
private:
    Point3D lap;//Look At Point
    Object *loObj;//Lock On OBJect
    double distance;//used for "loObj"
    double lensAngle;
    double near,far;
    int state;
	bool lockDirectionHorizontal,lockDirectionVertical;
	
	void recalculatePosition();
	void recalculatePosDirH();
	void recalculatePosDirV();
	void recalculateDistance();
    
public:
    Camera();
	~Camera();
    
    //Look At Point
    Camera& lookAt(Point3D &pt);
    
    //Lock On Object
    Camera& lockOnObject(Object *obj);
    
    //Free Movement
    Camera &freeMovement();
    
    //ALL / MULTIPLE
    Camera& rotateAroundR(double horizontal, double vertical);
	Camera& rotateAroundD(double horizontal, double vertical);
    Direction3D& recalculateDirection();//used for loObj and lap
	Camera& zoom(double zoomDist);
	Camera& zoomExp(double zoomExp);
	Camera& setDistance(double distance);
	double getDistance();
	Camera& setNear(double near);
	Camera& setFar(double far);
	Camera& setLensAngle(double angle);
	double getNear();
	double getFar();
	double getLensAngle();
	Camera& lockAngle();
	Camera& lockAngleHorizontal();
	Camera& lockAngleVertical();
	Camera& unlockAngle();
    
    //OTHER FUN STUFF:
    void __cameraSetup();
};
